package com.gzgy.ustore.api.dao.impl;

import com.gzgy.ustore.api.common.jdbc.StatementParameter;
import com.gzgy.ustore.api.dao.AppDownloadRuleDao;
import com.ustore.model.AppDownloadRule;
import org.springframework.stereotype.Repository;

@Repository
public class AppDownloadRuleDaoImpl extends AbstractBaseDao<AppDownloadRule> implements AppDownloadRuleDao {

    @Override
    public AppDownloadRule getAppDownloadRuleByAppCode(String appCode) {
        String sql = "SELECT * FROM "+this.tableName+" WHERE APP_CODE = ?  AND IS_DELETED =FALSE ";

        StatementParameter parameter  = new StatementParameter();
        parameter.setString(appCode);

        return this.query(sql,AppDownloadRule.class,parameter);
    }
}
